package Ch15;

import java.util.ArrayList;

public class ArrayListEx {

	public static void main(String[] args) {
		ArrayList<String> list = new ArrayList<String>();
		
		list.add("aaaaa");
		list.add("bbbbb");
		list.add("cccc");
		list.add("dddddd");
		list.add(1,"eeee");
		list.set(2,"ffff");
		
		System.out.println(list);
		
		String str = list.get(1);
		
		String str1 = list.remove(2);
		
		System.out.println("list : " + list);
		System.out.println("str : " + str);
		System.out.println("str1 : " + str1);
	}
}

